package com.coolnie.entity;

import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Size;

/**
 * Created by Administrator on 2017/3/29 0029.
 */
public class User {
@NotEmpty(message = "用户名不为空")
    private  String username;

    @NotEmpty(message = "昵称不能为空")
    private String nickname;
 @Size(min = 3,max = 10,message = "密码长度为3到10位")
    private String password;

    public User() {
    }
    public User(String username,String nickname,String password){
        this.username=username;
        this.nickname=nickname;
        this.password=password;
    }
    public  String getUsername(){
        return username;
    }
    public void setusername(String username){
        this.username=username;
    }
    public  String getNickname(){
        return nickname;
    }
    public void setnickname(String nickname){
        this.nickname=nickname;
    }
    public  String getPassword(){
        return password;
    }
    public void setpassword(String password){
        this.password=password;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", nickname='" + nickname + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}


